Skip to content

fix(cli): isolate update test working directory and restore codeint.json schema - #145

Merged
avidianity merged 1 commit into
mainfrom
fix/update-test-cwd-and-schema
Nov 22, 2026
Merged

avidianity merged 1 commit into
mainfrom
fix/update-test-cwd-and-schema

Conversation

@avidianity

Copy link
Copy Markdown
Owner

Summary

Isolate crates/cli/tests/update.rs by running run_exe inside the temporary binary directory so the v9.9.9 self-update test never mutates the repository's own codeint.json, and restore codeint.json's $schema URL to v0.3.0.

Tier

Tier 1 from the tier check: test isolation fix in crates/cli/tests/update.rs and restoring codeint.json $schema.

Task

Fix root cause of codeint.json being rewritten to v9.9.9 during cargo test --test update:

  • Set current_dir in crates/cli/tests/update.rs::run_exe to the temporary install folder
  • Restore codeint.json $schema to v0.3.0
  • Verify cargo test --locked --package codeint-cli --test update leaves codeint.json untouched

Fail-first test

  • Test: cargo test --locked --package codeint-cli --test update followed by git diff codeint.json
  • Before the change: running update_verifies_checksum_and_replaces_standalone_binary_in_place mutated the repository's codeint.json $schema to v9.9.9
  • After the change: all 5 tests in update.rs pass and git diff codeint.json is empty.

Checks

Check Result
cargo test --locked --package codeint-cli --test update passed (5/5, codeint.json unchanged)
lefthook pre-commit hooks passed

Safety proof

Not applicable: Tier 0 or 1.

Runtime evidence

Not applicable: no user-visible change.

Gaps

  • Deferred coverage: none
  • Pre-existing failures: none
  • Environmental failures: none

@github-actions github-actions Bot added the tier-2 Tier 2 from the tier check label Nov 22, 2026
@avidianity
avidianity merged commit b31ae5a into main Nov 22, 2026
9 checks passed
@avidianity
avidianity deleted the fix/update-test-cwd-and-schema branch November 22, 2026 08:31
@avidianity avidianity mentioned this pull request Nov 22, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tier-2 Tier 2 from the tier check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant